double *y,
GdkModifierType *mask)
{
- gboolean return_val;
-
- g_return_val_if_fail (surface == NULL || GDK_IS_SURFACE (surface), FALSE);
-
- return_val = TRUE;
-
- if (!GDK_SURFACE_DESTROYED (surface))
- {
- GdkSurface *child;
+ if (GDK_SURFACE_DESTROYED (surface))
+ return FALSE;
- gdk_wayland_device_query_state (device, surface, &child, x, y, mask);
- return_val = (child != NULL);
- }
+ gdk_wayland_device_query_state (device, surface, NULL, x, y, mask);
- return return_val;
+ return *x >= 0 && *y >= 0 && *x < surface->width && *y < surface->height;
}
static void